package com.ztgf.shopping.service.shop;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.shopping.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.shopping.mapper.shop.ShopQiyuesuoInfoLogMapper;
import com.ztgf.shopping.models.service.shop.IShopQiyuesuoInfoLogService;
import com.ztgf.shopping.models.bo.shop.ShopQiyuesuoInfoLogSaveBO;
import com.ztgf.shopping.models.dto.shop.ShopQiyuesuoInfoLogDTO;

/**
 * 契约锁日志信息控制器
 *
 * @author YUE
 * @Date 2020-09-08 16:58:43
 */
@DubboService
public class ShopQiyuesuoInfoLogServiceImpl extends ServiceImpl<ShopQiyuesuoInfoLogMapper, ShopQiyuesuoInfoLogDTO> implements IShopQiyuesuoInfoLogService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(ShopQiyuesuoInfoLogSaveBO saveBO) {
        ShopQiyuesuoInfoLogDTO dto = new ShopQiyuesuoInfoLogDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
